#ifndef COMMONUI_GFX_POINT_H_
#define COMMONUI_GFX_POINT_H_
#pragma once

#include "../concise-ui.h"

namespace gfx {

class CONCISEUI_API Point
{
public:
	Point();
	Point(int x, int y);
	Point(const Point& point);
	~Point(void);

	void SetPoint(int x, int y) { x_ = x; y_ = y; }
	int X() const { return x_; }
	int Y() const { return y_; }
	void SetX(int x) { x_ = x; }
	void SetY(int y) { y_ = y; }

	void Offset(int delta_x, int delta_y)
	{
		x_ += delta_x;
		y_ += delta_y;
	}

	Point& operator= (const Point& rhs);
	Point operator+ (const Point& rhs) const;
	Point& operator+= (const Point& rhs);
	Point operator- (const Point& rhs) const;
	Point& operator-= (const Point& rhs);
	bool operator== (const Point& rhs) const;
	bool operator!= (const Point& rhs) const;
	bool operator> (const Point& rhs) const;
	bool operator>= (const Point& rhs) const;
	bool operator< (const Point& rhs) const;
	bool operator<= (const Point& rhs) const;

private:
	int x_;
	int y_;
};

} // namespace gfx

#endif // COMMONUI_GFX_POINT_H_